class Demo3_SuperMan 
{
	public static void main(String[] args) 
	{
		Person p = new SuperMan();   //父类引用子类就是向上转型
		System.out.println(p.name);   
		p.谈生意();
		SuperMan sm = (SuperMan)p; // 行下转型
		sm.fly();
	}
}

class Person
{
	String name = "Jhon";
	public void 谈生意(){
		System.out.println("谈生意");
	}
}

class SuperMan extends Person
{
	String name = "superMan";
	
	public void 谈生意(){
		System.out.println("谈几个亿的大生意");
	}

	public void fly(){
	
	}
}